<?php 

/**
 * 临时批处理脚本
 * @author user
 *
 */
class RunController extends SCController {
	
	public function __construct() {
		parent::__construct();
	}
	
	public function __empty() {
		
	}
	
	public function index() {
		$data = array(
			2 => array(
				80 => array('path' => '201212/80/135594091611212000.jpg', 'width' => 80, 'height' => 45),
				200 => array('path' => '201212/200/135594091611212000.jpg', 'width' => 200, 'height' => 112),
				400 => array('path' => '201212/400/135594091611212000.jpg', 'width' => 400, 'height' => 225),
			),
			3 => array(
				80 => array('path' => '201212/80/135594091636166100.jpg', 'width' => 80, 'height' => 45),
				200 => array('path' => '201212/200/135594091636166100.jpg', 'width' => 200, 'height' => 113),
				400 => array('path' => '201212/400/135594091636166100.jpg', 'width' => 400, 'height' => 227),
			),
			4 => array(
				80 => array('path' => '201212/80/135594091642667500.jpg', 'width' => 80, 'height' => 58),
				200 => array('path' => '201212/200/135594091642667500.jpg', 'width' => 200, 'height' => 146),
				400 => array('path' => '201212/400/135594091642667500.jpg', 'width' => 400, 'height' => 293),
			),
			5 => array(
				80 => array('path' => '201212/80/135594091653637200.jpg', 'width' => 80, 'height' => 60),
				200 => array('path' => '201212/200/135594091653637200.jpg', 'width' => 200, 'height' => 150),
				400 => array('path' => '201212/400/135594091653637200.jpg', 'width' => 400, 'height' => 300),
			),
			6 => array(
				80 => array('path' => '201212/80/135594091660781300.jpg', 'width' => 80, 'height' => 80),
				200 => array('path' => '201212/200/135594091660781300.jpg', 'width' => 200, 'height' => 200),
				400 => array('path' => '201212/400/135594091660781300.jpg', 'width' => 400, 'height' => 400),
			),
			7 => array(
				80 => array('path' => '201212/80/135599758142974800.jpg', 'width' => 80, 'height' => 56),
				200 => array('path' => '201212/200/135599758142974800.jpg', 'width' => 200, 'height' => 141),
				400 => array('path' => '201212/400/135599758142974800.jpg', 'width' => 400, 'height' => 282),
			),
			8 => array(
				80 => array('path' => '201212/80/135605416935464100.jpg', 'width' => 80, 'height' => 74),
				200 => array('path' => '201212/200/135605416935464100.jpg', 'width' => 104, 'height' => 97),
				400 => array('path' => '201212/400/135605416935464100.jpg', 'width' => 104, 'height' => 97),
			),
		);
		foreach($data as $photo_id=>$thumbs) {
			#print_r($thumbs);
			$this->model->from('sc_photo')->where('photo_id = '.$photo_id)->update(array('thumbs' => serialize($thumbs)));
		}
	}
	
}